<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/Public/wqq/css/common.css" rel="stylesheet" type="text/css" />
<link href="/Public/wqq/css/style.css" rel="stylesheet" type="text/css" />
<link href="/Public/wqq/fonts/iconfont.css" rel="stylesheet" type="text/css" />
<script src="/Public/wqq/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="/Public/wqq/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
<script src="/Public/wqq/js/common_js.js" type="text/javascript"></script>
<script src="/Public/wqq/js/footer.js" type="text/javascript"></script>
<script src="/Public/wqq/js/lrtk.js" type="text/javascript"></script>



<title>购物车</title>
</head>
<body>
<!--顶部图层-->
<div id="header_top">
	<div id="top">
		<div class="Inside_pages">
			<div class="Collection">下午好，欢迎光临锦宏颜！<em></em><a href="#">收藏我们</a></div>
			<div class="hd_top_manu clearfix">
				<ul class="clearfix">
					<li class="hd_menu_tit zhuce" data-addclass="hd_menu_hover">欢迎光临本店！
						<?php if(session('id') > 0): ?><a href="" class="red"><?php echo (session('username')); ?></a>　<a href="<?php echo ($user); ?>" class="red">[<i class="iconfont icon-yonghu"></i>个人中心]</a>
							<a href="<?php echo ($loginout); ?>" class="red">[退出]</a>
						<?php else: ?> 
							<a href="<?php echo ($login); ?>" class="red">[请登录]</a> 新用户<a href="<?php echo ($regist); ?>" class="red">[免费注册]</a><?php endif; ?>
					</li>
					<li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="<?php echo ($orderlist); ?>">我的订单</a></li> 
					<li class="hd_menu_tit" data-addclass="hd_menu_hover"> <a href="<?php echo ($cart); ?>"><i class="iconfont icon-cart2"></i>　购物车</a> </li>
					<li class="hd_menu_tit" data-addclass="hd_menu_hover"><a href="#">联系我们</a></li>
					<li class="hd_menu_tit list_name" data-addclass="hd_menu_hover"><a href="#" class="hd_menu">客户服务</a>
						<div class="hd_menu_list">
							<ul>
								<li><a href="#">常见问题</a></li>
								<li><a href="#">在线退换货</a></li>
								<li><a href="#">在线投诉</a></li>
								<li><a href="#">配送范围</a></li>
							</ul>
						</div>	   
					</li>
					<li class="hd_menu_tit phone_c" data-addclass="hd_menu_hover"><a href="#" class="hd_menu "><em class="iconfont icon-shouji"></em>手机版</a>
						<div class="hd_menu_list erweima">
							<ul>
								<img src=""  width="100px" height="100"/>
							</ul>
						</div>	   
					</li>
				</ul>
			</div>
		</div>
	</div>
  <!--样式-->
<!--顶部样式2-->
	<div id="header "  class="header page_style">
		<div class="logo"><a href="index.html"><img src="/Public/wqq/images/logo.png" /></a></div>
		<!--结束图层-->
		<div class="Search">
			<p><input name="" type="text"  class="text"/><input name="" type="submit" value="搜 索"  class="Search_btn"/></p>
			<p class="Words"><a href="#">苹果</a><a href="#">香蕉</a><a href="#">菠萝</a><a href="#">西红柿</a><a href="#">橙子</a><a href="#">苹果</a></p>
		</div>
	 <!--购物车样式-->
		<div class="hd_Shopping_list" id="Shopping_list">
			<div class="s_cart">
				<em class="iconfont icon-cart2"></em><a href="#">我的购物车</a> <i class="ci-right">&gt;</i><i class="ci-count" id="shopping-amount">
				<?php if($num > 0): echo ($num); ?>
				<?php else: ?>
				0<?php endif; ?>
				</i>
			</div>
			<?php if($num > 0): ?><div class="dorpdown-layer">
				<div class="spacer"></div>
				<div class="prompt"></div>
				<!-- <div class="nogoods"><b></b>购物车中还没有商品，赶紧选购吧！</div> -->
				<ul class="p_s_list">
					<?php if(is_array($buycart)): foreach($buycart as $key=>$vo): ?><li>
							<input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>">
							<div class="img" style="float: left;"><img src="/Public/upload/<?php echo ($vo['photos']); ?>"></div>
							<div class="content" style="float: left;"><p><a href="#"><?php echo ($vo['merchandise']); ?></a></p>
							<!-- <p>颜色分类:紫花8255尺码:XL</p> -->
							</div>
							<div class="Operations">
								<p class="Price">￥<?php echo ($vo['price']); ?></p>
								<p><a href="<?php echo ($delete); ?>?id=<?php echo ($vo["id"]); ?>">删除</a></p>
							</div>
						</li><?php endforeach; endif; ?>
				</ul>		
			<div class="Shopping_style">
				<div class="p-total">共<b><?php echo ($num); ?></b>件商品　共计<strong>￥ <?php echo ($sumtotal); ?></strong></div>
				<a href="#" title="去购物车结算" id="btn-payforgoods" class="Shopping">去购物车结算</a>
			</div>	 
			</div>
			<?php else: ?>
			<div class="dorpdown-layer">
				<div class="spacer"></div>
				<div class="prompt"></div>
			<div class="nogoods"><b></b>购物车中还没有商品，赶紧选购吧！</div>
			</div><?php endif; ?>
		</div>
	</div>
	<!--菜单导航样式-->
	<div id="Menu" class="clearfix">
		<div class="index_style clearfix">
			<div id="allSortOuterbox" class="display">
				<div class="t_menu_img"></div>
				<div class="Category"><a href="#"><em></em>所有产品分类</a></div>
				<div class="hd_allsort_out_box_new">
				<!--左侧栏目开始-->
					<ul class="Menu_list">	
						<?php if(is_array($list)): foreach($list as $key=>$vo): ?><li class="name"> 
								<div class="Menu_name"><a href="product.html?pid=<?php echo ($vo['id']); ?>" ><?php echo ($vo['category']); ?></a> <span>&lt;</span></div> 
								<div class="link_name">
									<p>
										<?php if(is_array($vo['child'])): foreach($vo['child'] as $key=>$voo): ?><a href="product.html?pid=<?php echo ($voo['id']); ?>"><?php echo ($voo['category']); ?></a><?php endforeach; endif; ?>
									</p>
								</div> 
								<div class="menv_Detail">
									<div class="cat_pannel clearfix">
										<div class="hd_sort_list">
											<?php if(is_array($vo['child'])): foreach($vo['child'] as $key=>$voo): ?><dl class="clearfix" data-tpc="1">
													<dt><a href="product.html?pid=<?php echo ($voo['id']); ?>"><?php echo ($voo['category']); ?><i>></i></a></dt>
													<dd>
														<?php if(is_array($voo['child'])): foreach($voo['child'] as $key=>$vooo): ?><a href="product.html?pid=<?php echo ($vooo['id']); ?>"><?php echo ($vooo['category']); ?></a><?php endforeach; endif; ?>
													</dd> 
												</dl><?php endforeach; endif; ?>
										</div>
										<div class="Brands">
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/34.jpg" /></a>
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/42.jpg" /></a>
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/152.jpg" /></a>
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/156.jpg" /></a>
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/458.jpg" /></a>
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/339.jpg" /></a>	
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/245.jpg" /></a>	
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/199.jpg" /></a>	
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/618.jpg" /></a>	
											<a href="#" class="logo_Brands"><img src="/Public/wqq/product/logo/644.jpg" /></a>
											<a href="#" class="AD_3"><img src="/Public/wqq/product/ad/2.jpg" /></a>	   
										</div>
									</div>
								<!--品牌-->		  
								</div>		 
							</li><?php endforeach; endif; ?>
					</ul>	
				</div>		
			</div>
			<script>$("#allSortOuterbox").slide({ titCell:".Menu_list li",mainCell:".menv_Detail",	});</script>
			<!--菜单栏-->
			<div class="Navigation" id="Navigation">
				<ul class="Navigation_name">
					<li><a href="index.html">首页</a></li>
					<?php if(is_array($list)): foreach($list as $key=>$vo): ?><li><a href="product.html?pid=<?php echo ($vo['id']); ?>"><?php echo ($vo['category']); ?></a></li><?php endforeach; endif; ?>
				</ul>			 
			</div>
			<script>$("#Navigation").slide({titCell:".Navigation_name li"});</script>		
	  	</div>
	</div>
</div>
<!--购物车样式-->
<div class="Inside_pages">
    <div class="Process_img">
        <img src="/Public/wqq/images/Process_img_01.png" />
    </div>
    <?php if($num > 0): ?><div class="content mar_20">
    <form action="<?php echo ($order); ?>" method="post" id="form">
        <table border="0" class="car_tab" style="width:1200px; margin-bottom:50px;" cellspacing="0" cellpadding="0">
            <thead>
                <tr>
                    <!-- <td><input type="checkbox" name="">全选</td> -->
                    <td class="car_th" width="490">商品名称</td>
                    <!-- <td class="car_th" width="140">属性</td> -->
                    <td class="car_th" width="150">购买数量</td>
                    <td class="car_th" width="130">小计</td>
                    <!-- <td class="car_th" width="140">返还积分</td> -->
                    <td class="car_th" width="150">操作</td>
                </tr>
            </thead>
            <tbody id="tbody">
                <?php $i=0; ?>
                <?php if(is_array($buycart)): $k = 0; $__LIST__ = $buycart;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr><!-- 
                    <td style="width: 20px;">
                        <input type="checkbox" name=""> -->
                        <input type="hidden" name="cart[<?php echo ($k); ?>][id]" value="<?php echo ($vo['id']); ?>" class="cartid">
                    <!-- </td>      -->
                    <td>
                        <div class="c_s_img"><img src="/Public/upload/<?php echo ($vo['photos']); ?>" width="73" height="73"></div>
                        <div class="merchandise"><?php echo ($vo['merchandise']); ?></div>
                        <div style="margin-top: 20px;color:#ff4e00;font-size: 18px;" >
                            <i style="font-size:20px; color:#ff4e00;">￥</i>
                            <i class="price"><?php echo ($vo['price']); ?></i>
                        </div>
                    </td>
                    <!-- <td align="center">颜色：灰色</td> -->
                    <td align="center">
                        <div class="c_num">
                            <input type="button" value="-" class="car_btn_1 reduce" />
                            <input type="text" value="<?php echo ($vo['number']); ?>" name="cart[<?php echo ($k); ?>][number]" class="car_ipt"  />  
                            <input type="button" value="+" class="car_btn_2 add" />
                        </div>
                    </td>
                    <td align="center" style="color:#ff4e00;font-size: 18px;" ><i style="font-size:22px; color:#ff4e00;">￥</i><i class="sum" name="sumtotal"><?php echo $vo['number']*$vo['price']; ?></i></td>
                    <!-- <td align="center">26R</td> -->
                    <td align="center"><a onclick="ShowDiv('MyDiv','fade')">删除</a>&nbsp; &nbsp;<a href="#">加入收藏</a></td>
                </tr>
                <?php $i=$i+$vo['number']*$vo['price']; endforeach; endif; else: echo "" ;endif; ?>
            </tbody>
                <tr height="70">
                    <td colspan="6" style="font-family:'Microsoft YaHei'; border-bottom:0;">
                        <label class="r_rad"><input type="checkbox" name="clear" checked="checked"></label><label class="r_txt">清空购物车</label>
                        <span class="fr">商品总价：<i style="font-size:22px; color:#ff4e00;">￥</i><b style="font-size:22px; color:#ff4e00;" id="total" name="total"><?php echo $i; ?></b></span>
                    </td>
                </tr>
                <tr valign="top" height="150">
                    <td colspan="6" align="right">
                        <a href="<?php echo ($product); ?>"><img src="/Public/wqq/images/buy1.gif"></a>&nbsp; &nbsp; 
                        <a id="pay"><img src="/Public/wqq/images/buy2.gif"></a>
                        <!-- <button><img src="/Public/wqq/images/buy2.gif"></button> -->
                    </td>
                </tr>        
        </table>
        </form>
    </div>
    <?php else: ?>
        <div class="content mar_20">
            <div class="nogoods"><b style="background-image: url(/Public/wqq/images/settleup-nogoods.png)"></b><h1 align="center">购物车中还没有商品，赶紧选购吧！</h1></div>
            <table border="0" class="car_tab" style="width:1200px; margin-bottom:50px;" cellspacing="0" cellpadding="0">
            <tr valign="top" height="150">
                    <td colspan="6" align="center" ">
                        <a href="<?php echo ($product); ?>"><img src="/Public/wqq/images/buy1.gif" style="font-size: 3em;"></a>
                    </td>
                </tr>
            </table>
        </div><?php endif; ?>
</div>
<div class="slogen">
  <div class="index_style">
    <ul class="wrap">
	 <li>
	  <a href="#"><img src="/Public/wqq/images/slogen_34.png" data-bd-imgshare-binded="1"></a>
	  <b>安全保证</b>
	  <span>多重保障机制 认证商城</span>
	 </li>
	 <li><a href="#"><img src="/Public/wqq/images/slogen_28.png" data-bd-imgshare-binded="2"></a>
	  <b>正品保证</b>
	  <span>正品行货 放心选购</span>
	 </li>
	 <li>
	  <a href="#"><img src="/Public/wqq/images/slogen_30.png" data-bd-imgshare-binded="3"></a>
	  <b>七天无理由退换</b>
	  <span>七天无理由保障消费权益</span>
	 </li>
      <li>
	  <a href="#"><img src="/Public/wqq/images/slogen_31.png" data-bd-imgshare-binded="4"></a>
	  <b>天天低价</b>
	  <span>价格更低，质量更可靠</span>
	 </li>
	</ul>
  </div>
 </div>
<!--底部图层-->
<div class="phone_style">
 <div class="index_style">
   <span class="phone_number"><em class="iconfont icon-dianhua"></em>400-4565-345</span><span class="phone_title">客服热线 7X24小时 贴心服务</span>
 </div>
</div>
<div class="footerbox clearfix">
  <div class="clearfix">
   <div class="">
    <dl>
	 <dt>新手上路</dt>
	 <dd><a href="#">售后流程</a></dd>
     <dd><a href="#">购物流程</a></dd>
     <dd><a href="#">订购方式</a> </dd>
     <dd><a href="#">隐私声明 </a></dd>
     <dd><a href="#">推荐分享说明 </a></dd>
	</dl>
	<dl>
	 <dt>配送与支付</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>
	<dl>
	 <dt>售后保障</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>
	<dl>
	 <dt>支付方式</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>	
    <dl>
	 <dt>帮助中心</dt>
	 <dd><a href="#">保险需求测试</a></dd>
     <dd><a href="#">专题及活动</a></dd>
     <dd><a href="#">挑选保险产品</a> </dd>
     <dd><a href="#">常见问题 </a></dd>
	</dl>	   
   </div>
  </div>
 <div class="text_link">
   <p>
  <a href="#">关于我们</a>｜ <a href="#">公开信息披露</a>｜ <a href="#">加入我们</a>｜ <a href="#">联系我们</a>｜ <a href="#">版权声明</a>｜ <a href="#">隐私声明</a>｜ <a href="#">网站地图</a></p>
	 <p>蜀ICP备11017033号 Copyright ©2011 成都福际生物技术有限公司 All Rights Reserved. Technical support:CDDGG Group</p>
  </div>
  </div>
<div class="fixedBox">
  <ul class="fixedBoxList">
      <li class="fixeBoxLi user"><a href="#"> <span class="fixeBoxSpan iconfont icon-yonghu"></span> <strong>用户</strong></a> </li>
 <!--    <li class="fixeBoxLi cart_bd" style="display:block;" id="cartboxs">
		<p class="good_cart">0</p>
			<span class="fixeBoxSpan iconfont icon-cart"></span> <strong>购物车</strong>
			<div class="cartBox">
       		<div class="bjfff"></div>
       		<div class="message">购物车内暂无商品，赶紧选购吧</div>
       			<ul class="p_s_list">
					<?php if(is_array($cart)): foreach($cart as $key=>$vo): ?><li>
							<div class="img><img src="/Public/upload/<?php echo ($vo['photos']); ?>"></div>
							<div class="content"><p><a href="#"><?php echo ($vo['merchandise']); ?></a></p><p>颜色分类:紫花8255尺码:XL</p></div>
							<div class="Operations">
								<p class="Price">￥<?php echo ($vo['price']); ?></p>
								<p><a href="#">删除</a></p>
							</div>
						</li><?php endforeach; endif; ?>
				</ul>
       		</div>
    </li> -->
    <li class="fixeBoxLi Service "> <span class="fixeBoxSpan iconfont icon-service"></span> <strong>客服</strong>
      <div class="ServiceBox">
        <div class="bjfffs"></div>
        <dl onclick="javascript:;">
		    <dt><img src=""></dt>
		       <dd><strong>QQ客服1</strong>
		          <p class="p1">9:00-22:00</p>
		           <p class="p2"><a href="http://wpa.qq.com/msgrd?v=3&amp;uin=123456&amp;site=DGG三端同步&amp;menu=yes">点击交谈</a></p>
		          </dd>
		        </dl>
				<dl onclick="javascript:;">
		          <dt><img src=""></dt>
		          <dd> <strong>QQ客服1</strong>
		            <p class="p1">9:00-22:00</p>
		            <p class="p2"><a href="http://wpa.qq.com/msgrd?v=3&amp;uin=123456&amp;site=DGG三端同步&amp;menu=yes">点击交谈</a></p>
		          </dd>
		        </dl>
	          </div>
     </li>
	 <li class="fixeBoxLi code cart_bd " style="display:block;" id="cartboxs">
			<span class="fixeBoxSpan iconfont icon-erweima"></span> <strong>微信</strong>
			<div class="cartBox">
       		<div class="bjfff"></div>
			<div class="QR_code">
			 <p><img src="" width="150px" height="150px" style=" margin-top:10px;" /></p>
			 <p>微信扫一扫，关注我们</p>
			</div>		
			</div>
			</li>

    <li class="fixeBoxLi Home"> <a href="./"> <span class="fixeBoxSpan iconfont  icon-shoucang"></span> <strong>收藏</strong> </a> </li>
    <li class="fixeBoxLi Home"> <a href="./"> <span class="fixeBoxSpan iconfont  icon-zuji"></span> <strong>足迹</strong> </a> </li>
    <li class="fixeBoxLi Home"> <a href="./"> <span class="fixeBoxSpan iconfont  icon-fankui"></span> <strong>反馈</strong> </a> </li>
    <li class="fixeBoxLi BackToTop"> <span class="fixeBoxSpan iconfont icon-top"></span> <strong>返回顶部</strong> </li>
  </ul>
</div> 
<script type="text/javascript">
    $('.add').on('click',function(){
        var a=$(this).parent().find('.car_ipt');
        var num=parseInt($(a).val());
        var price =$(this).parent().parent().parent().find('.price').text();
        price=parseFloat(price);
        num++;
        $(a).val(num);
        var sumtotal = price*num;
        sumtotal=sumtotal.toFixed(2);
        var sum=$(this).parent().parent().next().find('.sum');
        $(sum).text(sumtotal);
        sumTotal();
    });
    $('.reduce').on('click',function(){
        var a=$(this).parent().find('.car_ipt');
        var num=parseInt($(a).val());            
        var price =$(this).parent().parent().parent().find('.price').text();
        price=parseFloat(price);
        if (num>1) {
            num--; 
            $(a).val(num);
            var sumtotal = price*num;
            sumtotal=sumtotal.toFixed(2);
            var sum=$(this).parent().parent().next().find('.sum');
            $(sum).text(sumtotal);
            sumTotal();
        }
    });
    function sumTotal(){
        var tr=$('#tbody tr');
        var total=0;
        for (var i = 0; i < tr.length; i++) {
            var num=parseInt($(tr[i]).find('.car_ipt').val());
            var price =parseFloat($(tr[i]).find('.price').text());
            total=total+(price*num);
        }
        total=total.toFixed(2);
        $('#total').text(total);
    }
    $('#pay').on('click',function(){
        $('#form').submit();
        return false;
    });
</script>
</body>
</html>